package com.tistory.admin.common;

import java.util.Locale;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller 
public class DisappointController { 

	/** 
	 * Mapping 주소가 없는 경우 UrlBasedViewResolver 의 Prefix 있는 JSP 자동연결 
	 */ 
	@RequestMapping(value = "/*.do", method = RequestMethod.GET) 
	public String disappoint(HttpServletRequest request, HttpServletResponse response, Locale locale, Model model) { 

		String view = request.getRequestURI(); 
		String ctx = request.getContextPath(); 

		return view.substring(1+ctx.length(), view.length()-3); 
	}
}